package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 系统颜色库表单对象
 *
 * @author youlaitech
 * @since 2025-07-06 16:08
 */
@Getter
@Setter
@Schema(description = "系统颜色库表单对象")
public class ColorForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Integer colorId;

    @Schema(description = "颜色名称（如珍珠白)")
    @NotBlank(message = "颜色名称（如珍珠白）不能为空")
    @Size(max=50, message="颜色名称（如珍珠白）长度不能超过50个字符")
    private String colorName;

    @Schema(description = "色号（如#FFFFFF/PANTONE 11-0601）")
    @Size(max=20, message="色号（如#FFFFFF/PANTONE 11-0601）长度不能超过20个字符")
    private String colorCode;

    @Schema(description = "是否自定义颜色")
    private Integer isCustom;

    @Schema(description = "创建人ID")
    private Long createBy;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改人ID")
    private Long updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
